1. Field of the Invention
The present invention generally relates to motion detecting apparatus and, more particularly, to a motion detecting apparatus suitable for detecting a motion vector or the like when real moving image data is coded at high efficiency, for example.
2. Description of the Prior Art
Motion detecting apparatus are used to detect a motion vector when a real moving image data is processed in high efficiency coding process. In such motion detecting apparatus, when a motion is detected, for example, in a full search block matching process, a difference absolute value m.sub.ij at every pixel is calculated as: ##EQU1## where b.sub.ij is a pixel in a search range and a.sub.ij is a pixel of reference data block.
In this case, a relation between b.sub.i+I+J and a.sub.IJ is complex and accordingly, all data (b.sub.ij) of the search range, for example, are written in a memory fabricated within an LSI (large scale integrated circuit) and data b.sub.ij corresponding to a.sub.IJ is read out from the above memory. Then, the calculation is carried out. As a consequence, the conventional apparatus needs an internal memory that when fabricated as an LSI, which unavoidably increases the circuit scale.
Further, when a motion vector is detected in the high efficiency coding process of, for example, real moving image data, for example, when a motion is detected in a full search block matching process, a motion detecting apparatus is used, in which pixels consisting of a predetermined number of pixels within a search range and pixels consisting of pixels of the number smaller than the former pixels within a reference data block are compared on the basis of an arrayed state thereof. In such motion detecting apparatus, after a motion with typical 1 pixel (pel) accuracy is detected, vector data in 8 directions around the calculated vector are interpolated (i.e., mean value between two points), thereby obtaining predicted images which are shifted by 0.5 pel each. Then, for the predicted images, a vector is calculated in which a residual between the predicted image and an original image (reference data block) is minimized (i.e, motion is detected at the accuracy of a half pel).
Let it be assumed that a motion vector shown in FIG. 1 is calculated by carrying out a motion detection of 1 pel accuracy with respect to, for example, reference data block of 4.times.4 pixels. Assuming a residual of S at that time, then the following equality is established: EQU S=.vertline.A.sub.7 -a.sub.14 .vertline.+.vertline.A.sub.8 -a.sub.15 .vertline.+ . . . +.vertline.A.sub.28 -a.sub.35 .vertline.
where a.sub.i represent 16 pixels of reference data block as shown in FIG. 1B and A.sub.i represent 16 pixels corresponding to reference data block in which a motion detection is carried out at 1 pel accuracy within the search range as shown in FIG. 1A.
When on the other hand a motion is detected at the accuracy of a half pel (0.5 pel), as shown in FIG. 2, pixels (6.times.6 data) of a search range larger than the above-mentioned 16 A.sub.i are utilized and the following equation (2) is calculated to search for a minimum sum:
__________________________________________________________________________ sum (-0.5, -0.5) = .vertline. (A.sub.0 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.1 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.21 + A.sub.28)/2 - a.sub.35 .vertline. sum (-0.5, 0) = .vertline. (A.sub.1 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.2 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.22 + A.sub.28)/2 - a.sub.35 .vertline. sum (-0.5, +0.5) = .vertline. (A.sub.2 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.3 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.23 + A.sub.28)/2 - a.sub.35 .vertline. sum (0, -0.5) = .vertline. (A.sub.6 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.7 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.27 + A.sub.28)/2 - a.sub.35 .vertline. sum (0, 0) = S sum (0, +0.5) = .vertline. (A.sub.8 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.9 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.29 + A.sub.28)/2 - a.sub.35 .vertline. sum (+0.5, -0.5) = .vertline. (A.sub.12 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.13 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.33 + A.sub.28)/2 - a.sub.35 .vertline. sum (+0.5, 0) = .vertline. (A.sub.13 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.14 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.34 + A.sub.28)/2 - a.sub.35 .vertline. sum (+0.5, +0.5) = .vertline. (A.sub.14 + A.sub.7)/2 - a.sub.14 .vertline. + .vertline. (A.sub.15 + A.sub.8)/2 - a.sub.15 .vertline. + . . . + .vertline. (A.sub.35 + A.sub.28)/2 - a.sub.35 .vertline. __________________________________________________________________________
However, when the motion detection of the half pel accuracy is carried out in the prior art, if the above equation (2) is directly calculated as described above, then each of A.sub.I +A.sub.j in the equation (2) must be calculated. Further, a corresponding relation between .left brkt-top.(A.sub.I +A.sub.J)/2.right brkt-bot. and .left brkt-top.r.sub.a.sbsb.k .right brkt-bot. is complicated so that the above equation (2) cannot be calculated without difficulty.
Furthermore, a third example of the conventional motion detecting apparatus will be described below.
In this conventional motion detecting apparatus, a processing is divided into a first stage in which a detection of 1 pixel (1 pel) accuracy is carried out and a second stage in which a detection of 0.5 pel (half pel) is carried out. As such motion detecting apparatus, the assignee of the present application has previously proposed a motion detecting apparatus, in which the detection of 1 pel accuracy is carried out on the basis of a so-called full search block matching process. Further, the assignee of the present application has proposed a motion detecting apparatus in which a detection of half pel accuracy is carried out after a detection of one pel accuracy is carried out.
More specifically, in such previously-proposed apparatus, when a motion detection of one pel accuracy is carried out, a sum of difference absolute values of respective pixels within a reference data block and corresponding pixels within a search range is calculated at every corresponding state of pixels which can be treated by a reference data block of g.times.p pixels within the search range of, for example, e.times.f pixels and the position of the block formed of g.times.p pixels in which the above sum becomes minimum is detected. On the other hand, when a motion detection of a half pel accuracy is carried out, then a mean value between adjacent pixels and a pixel within a reference data block are compared and difference absolute value sums are obtained at every corresponding state with respect to the pixels within the reference data block. When the motion detection of one pel accuracy is carried out, in the motion detection of half pel accuracy, (g+2).times.(p+2) pixels which are expanded from the thus detected block of g.times.p pixels by one pixel each must be processed.
Accordingly, when an apparatus for detecting a motion of a half pel accuracy is arranged by coupling the above-mentioned two apparatus, then the above-mentioned proposed apparatus can perform a motion detection of one pel accuracy at g.times.p cycles and can perform a real time processing. However, when a motion of half pel accuracy is detected, (g+2).times.(p+2) cycles must be provided for performing its process. As a consequence, when the latter processing is carried out in a real time fashion, the processing speed of the apparatus which carries out the motion detection of half pel accuracy must be increased by (g+2).times.(p+2)/g.times.p times, which needs a special apparatus. Further, complicated circuits also must be provided in order to transfer image data.